<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>智慧巴士信息</title>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="../../js/jquery.cookie.js"></script>
    <script src="../../js/layer/layer.js"></script>
    <style type="text/css">
        ul li {
            list-style: none;
            /*display: inline-block;*/
        }


        #page ul li {
            width: 40px;
            height: 30px;
            line-height: 30px;
            text-align: center;
        }

        .liNomal {
            background-color: antiquewhite;
            cursor: pointer;
        }

        .liNomal:hover {
            background-color: aquamarine;+
        }

        .liDisable {
            cursor: not-allowed;
        }

        table {
            width: 80%;
            margin: 0 auto;
        }

        th,
        td {
            border: 1px solid #FAEBD7;
            text-align: center;
        }

        tr:hover td {
            background-color: aliceblue;
            cursor: pointer;
        }

        #page {
            text-align: center;
        }

        #search {
            margin-left: 50px;
        }
        #new{
            margin-left: 50px;
        }
        #new input{
            width: 50px;
            height: 30px;
            line-height: 30px;
            background-color: #4476A7;
            color: #F8F8F8;
            border: 1px solid #4476A7;
            border-radius: 5px;
        }
        #new input:hover{
            background-color:#F0F8FF;
            color: #4476A7;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div>
    <ul>
        <li>编号:<input type="text" readonly="readonly" id="id" name="id"/></li>
        <li>巴士名称:<input type="text" readonly="readonly" id="name" name="name"/></li>
        <li>巴士起点:<input type="text" readonly="readonly"  id="startPoint" name="startPoint"/></li>
        <li>巴士终点:<input type="text" readonly="readonly"  id="endPoint" name="endPoint"/></li>
        <li>价格:<input type="text" readonly="readonly"  id="price" name="price"/></li>
        <li>里程:<input type="text" readonly="readonly"  id="distance" name="distance"/></li>
        <li>开行时间:<input type="text" readonly="readonly"  id="time" name="time"/></li>
    </ul>
</div>
<input type="button" value="返回" id="backBtn"/>
</body>
<script>
    $(function () {
        $("#backBtn").click(function () {
            window.location.href="list.html";
        });
        init();
    });

    function init() {
        var id = getUrlParam("id");
        $.ajax({
            contentType: "json",
            url: baseUrl+"bus/getOneById.json",
            data: {
                id:id
            },
            success: function (data) {
                if (data.code == "200") {
                    $("#id").val(data.bus.id);
                    $("#name").val(data.bus.name);
                    $("#startPoint").val(data.bus.startPoint);
                    $("#endPoint").val(data.bus.endPoint);
                    $("#price").val(data.bus.price);
                    $("#distance").val(data.bus.distance);
                    $("#time").val(data.bus.time);
                } else {
                    alert("获取失败!");
                }
            }
        });
    }

</script>
</html>